package com.weibo.service.impl;


import sun.security.provider.MD5;

import com.weibo.dao.IUserDao;
import com.weibo.pojo.Tuser;
import com.weibo.service.IUserService;

public class UserServiceImpl implements IUserService {
	IUserDao userDao;
	public IUserDao getUserDao() {
		return userDao;
	}

	public void setUserDao(IUserDao userDao) {
		this.userDao = userDao;
	}

	@Override
	public Tuser getUserById(Integer userId) {
		return userDao.getUserById(userId);
	}

	@Override
	public boolean isExistUser(Tuser user) throws Exception {
		return userDao.isExistUser(user);
	}

	@Override
	public boolean isExistUser(String userName) throws Exception {
		// TODO Auto-generated method stub
		return userDao.isExistUser(userName);
	}

	@Override
	public void saveUser(Tuser user) throws Exception {
		userDao.saveUser(user);
	}

	@Override
	public Tuser getUserByName(String userName) throws Exception {
		// TODO Auto-generated method stub
		return userDao.getUserByName(userName);
	}
	
}
